#ifndef SMART_BOX_H
#define SMART_BOX_H
#include <Arduino.h>
#include "Scheduler.h"
#include "I2CSlave.h"
#include "DataStorage.h"
#include "lwmp.h"
#include "DispatcherHandler.h"
#include <mail.h>

class SmartBox : public Scheduler
{
public:

SmartBox(I2CSlave& i2c_slave,DispatcherHandler& dispatcher,Mail<>& mb);
~SmartBox();

void begin();
void schedule() override;
void update() override;
void dispatch(uint8_t* data,size_t size) override{}
void cleanup()override;

private:
    I2CSlave& _i2c_slave;
    DispatcherHandler& _dispatcher;
    Mail<>& _mb;
    os::memory_pool_t::memory_node_t _reg_data_read;
};


#endif